package cn.edu.gduf.luowowo.comment.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@Document("scenic_comment")
public class ScenicComment implements Serializable{
    public static final int SCENIC_COMMENT_TYPE_COMMENT=0;//普通的点评
    public static final int SCENIC_COMMENT_TYPE_COMMENTSON=1;//点评的点评
    @Id
    private String id;

    private Long scenicId;//景点的id

    private Long author;//用户
    private String nickname;//用户的昵称
    private int level;//用户的等级
    private String headImgUrl;//用户的头像

    private int type = SCENIC_COMMENT_TYPE_COMMENT;//点评的类别

    private Date createTime;//点评的创建时间
    private String content;//点评的内容
    private String scImg;//景点的评论图片
    private Integer startNum;//总体评价

    private List<ScenicComment> refComment=new ArrayList<>();//关联的评论


}
